<?php
/**
 * 基础memcache类
 * @author Ivan<hanwei@leju.sina.com.cn>
 * @version  v1.0 2010-03-03
 */
define("MEM_CACHE_KEY_PREFIX",$_SERVER["SINASRV_MEMCACHED_KEY_PREFIX"]); //定义memcache的key前缀
define("MEM_CACHE_LIFETIME",3); //缓存时间,单位秒,0表示长久有效
class lib_base_memcache extends Memcache
{
	public function __construct()
	{
		$servers = explode(" ",$_SERVER["SINASRV_MEMCACHED_SERVERS"]);
		foreach($servers as $val)
		{
			$v = explode(":",$val);
			$this->addServer($v[0],$v[1]);
		}
	}
}
?>